package com.ucpaas.domain;

import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * Created by:xiaoqingwen   on 2018/4/8 on 16:09
 */
@CacheConfig(cacheNames = "users")
public interface UserRepository extends JpaRepository<User, Long> {

    //@Cacheable(value = "users", key = "#id")
    @Cacheable
    User findByName(String name);

}
